<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="DoMain.Food" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
 <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<title>updateOrderfood</title>
</head>
<body>
<% 
		Object msg=request.getAttribute("message");
		if(msg!=null){	
	%>
	
	<font color="red"><%=msg %></font>
	
	<%	} %>
	
	<%	
	String foodNo=null;
	String foodName=null;
	String foodDescription=null;
	String foodPrice=null;
	String status=null;
	
	Food food=(Food)request.getAttribute("food");	
	
	if(food!=null){
		
		foodNo=food.getFoodNo()+"";
		foodName=food.getFoodName();
		foodDescription=food.getFoodDescription();
		foodPrice=food.getFoodPrice();
		status=food.getStatus();
		
	%>
	
	<% }else{
		foodNo=request.getParameter("foodNo");
		foodName=request.getParameter("foodName");
		foodDescription=request.getParameter("foodDescription");
		foodPrice=request.getParameter("foodPrice");
		status=request.getParameter("status");
		
	}
	%>
	
	<form action="updateOrder.do" method="post">
	
	<input type="hidden" name="foodNo" value="<%=foodNo%>">

	

	<div class="input-group">
    <span class="col-sm-2 col-form-label">套餐名称:</span>
    </div>
	<input type="text" name="foodName" value="<%=foodName%>">
	<div class="input-group">
    <span class="col-sm-2 col-form-label">套餐描述:</span>
    </div>
	<input type="text" name="foodDescription" value="<%=foodDescription%>">
	<div class="input-group">
    <span class="col-sm-2 col-form-label">套餐价格:</span>
    </div>
    <div class="input-group">
    <select name="years" value="${years}">
    <option value="1998年" <c:if test="${'1998' eq curYears}">selected</c:if>>1998</option>
    <option value="1999年" <c:if test="${'1999' eq curYears}">selected</c:if>>1999</option>
    <option value="2000年" <c:if test="${'2000' eq curYears}">selected</c:if>>2000</option>
    <option value="2001年" <c:if test="${'2001' eq curYears}">selected</c:if>>2001</option>
    <option value="2002年" <c:if test="${'2002' eq curYears}">selected</c:if>>2002</option>
    <option value="2003年" <c:if test="${'2003' eq curYears}">selected</c:if>>2003</option>
    <option value="2004年" <c:if test="${'2004' eq curYears}">selected</c:if>>2004</option>
    <option value="2005年" <c:if test="${'2005' eq curYears}">selected</c:if>>2005</option>
    <option value="2006年" <c:if test="${'2007' eq curYears}">selected</c:if>>2006</option>
    <option value="2007年" <c:if test="${'2007' eq curYears}">selected</c:if>>2007</option>
    <option value="2008年" <c:if test="${'2008' eq curYears}">selected</c:if>>2008</option>
    <option value="2009年" <c:if test="${'2009' eq curYears}">selected</c:if>>2009</option>
    <option value="2010年" <c:if test="${'2010' eq curYears}">selected</c:if>>2010</option>
    <option value="2011年" <c:if test="${'2011' eq curYears}">selected</c:if>>2011</option>
    <option value="2012年" <c:if test="${'2012' eq curYears}">selected</c:if>>2012</option>
    <option value="2013年" <c:if test="${'2013' eq curYears}">selected</c:if>>2013</option>
    <option value="2014年" <c:if test="${'2014' eq curYears}">selected</c:if>>2014</option>
    <option value="2015年" <c:if test="${'2015' eq curYears}">selected</c:if>>2015</option>
    <option value="2016年" <c:if test="${'2016' eq curYears}">selected</c:if>>2016</option>
    <option value="2017年" <c:if test="${'2017' eq curYears}">selected</c:if>>2017</option>
    <option value="2018年" <c:if test="${'2018' eq curYears}">selected</c:if>>2018</option>
    <option value="2019年" <c:if test="${'2019' eq curYears}">selected</c:if>>2019</option>
    <option value="2020年" <c:if test="${'2020' eq curYears}">selected</c:if>>2020</option>
    <option value="2021年" <c:if test="${'2021' eq curYears}">selected</c:if>>2021</option>
    </select><span>年</span>
    <select name="months" value="${months}">
    <option value="1月" <c:if test="${'1' eq curMonths}">selected</c:if>>1</option>
    <option value="2月" <c:if test="${'2' eq curMonths}">selected</c:if>>2</option>
    <option value="3月" <c:if test="${'3' eq curMonths}">selected</c:if>>3</option>
    <option value="4月" <c:if test="${'4' eq curMonths}">selected</c:if>>4</option>
    <option value="5月" <c:if test="${'5' eq curMonths}">selected</c:if>>5</option>
    <option value="6月" <c:if test="${'6' eq curMonths}">selected</c:if>>6</option>
    <option value="7月" <c:if test="${'7' eq curMonths}">selected</c:if>>7</option>
    <option value="8月" <c:if test="${'8' eq curMonths}">selected</c:if>>8</option>
    <option value="9月" <c:if test="${'9' eq curMonths}">selected</c:if>>9</option>
    <option value="10月" <c:if test="${'10' eq curMonths}">selected</c:if>>10</option>
    <option value="11月" <c:if test="${'11' eq curMonths}">selected</c:if>>11</option>
    <option value="12月" <c:if test="${'12' eq curMonths}">selected</c:if>>12</option>
    </select><span>月</span>
    <select name="days" value="${days}">
    <option value="1日" <c:if test="${'1' eq curDays}">selected</c:if>>1</option>
    <option value="2日" <c:if test="${'3' eq curDays}">selected</c:if>>2</option>
    <option value="3日" <c:if test="${'3' eq curDays}">selected</c:if>>3</option>
    <option value="4日" <c:if test="${'4' eq curDays}">selected</c:if>>4</option>
    <option value="5日" <c:if test="${'5' eq curDays}">selected</c:if>>5</option>
    <option value="6日" <c:if test="${'6' eq curDays}">selected</c:if>>6</option>
    <option value="7日" <c:if test="${'7' eq curDays}">selected</c:if>>7</option>
    <option value="8日" <c:if test="${'8' eq curDays}">selected</c:if>>8</option>
    <option value="9日" <c:if test="${'9' eq curDays}">selected</c:if>>9</option>
    <option value="10日" <c:if test="${'10' eq curDays}">selected</c:if>>10</option>
    <option value="11日" <c:if test="${'11' eq curDays}">selected</c:if>>11</option>
    <option value="12日" <c:if test="${'12' eq curDays}">selected</c:if>>12</option>
    <option value="13日" <c:if test="${'13' eq curDays}">selected</c:if>>13</option>
    <option value="14日" <c:if test="${'14' eq curDays}">selected</c:if>>14</option>
    <option value="15日" <c:if test="${'15' eq curDays}">selected</c:if>>15</option>
    <option value="16日" <c:if test="${'16' eq curDays}">selected</c:if>>16</option>
    <option value="17日" <c:if test="${'17' eq curDays}">selected</c:if>>17</option>
    <option value="18日" <c:if test="${'18' eq curDays}">selected</c:if>>18</option>
    <option value="19日" <c:if test="${'19' eq curDays}">selected</c:if>>19</option>
    <option value="20日" <c:if test="${'20' eq curDays}">selected</c:if>>20</option>
    <option value="21日" <c:if test="${'21' eq curDays}">selected</c:if>>21</option>
    <option value="22日" <c:if test="${'22' eq curDays}">selected</c:if>>22</option>
    <option value="23日" <c:if test="${'23' eq curDays}">selected</c:if>>23</option>
    <option value="24日" <c:if test="${'24' eq curDays}">selected</c:if>>24</option>
    <option value="25日" <c:if test="${'25' eq curDays}">selected</c:if>>25</option>
    <option value="26日" <c:if test="${'26' eq curDays}">selected</c:if>>26</option>
    <option value="27日" <c:if test="${'27' eq curDays}">selected</c:if>>27</option>
    <option value="28日" <c:if test="${'28' eq curDays}">selected</c:if>>28</option>
    <option value="29日" <c:if test="${'29' eq curDays}">selected</c:if>>29</option>
    <option value="30日" <c:if test="${'30' eq curDays}">selected</c:if>>30</option>
    <option value="31日" <c:if test="${'31' eq curDays}">selected</c:if>>31</option>
    </select><span>日</span>
    </div><br>
    <div class="input-group">
    <select name="hours" value="${hours}">
    <option value="1时" <c:if test="${'31' eq curHours}">selected</c:if>>1</option>
    <option value="2时" <c:if test="${'31' eq curHours}">selected</c:if>>2</option>
    <option value="3时" <c:if test="${'31' eq curHours}">selected</c:if>>3</option>
    <option value="4时" <c:if test="${'31' eq curHours}">selected</c:if>>4</option>
    <option value="5时" <c:if test="${'31' eq curHours}">selected</c:if>>5</option>
    <option value="6时" <c:if test="${'31' eq curHours}">selected</c:if> >6</option>
    <option value="7时" <c:if test="${'31' eq curHours}">selected</c:if>>7</option>
    <option value="8时" <c:if test="${'31' eq curHours}">selected</c:if>>8</option>
    <option value="9时" <c:if test="${'31' eq curHours}">selected</c:if>>9</option>
    <option value="10时" <c:if test="${'31' eq curHours}">selected</c:if>>10</option>
    <option value="11时" <c:if test="${'31' eq curHours}">selected</c:if>>11</option>
    <option value="12时" <c:if test="${'31' eq curHours}">selected</c:if>>12</option>
    <option value="13时" <c:if test="${'31' eq curHours}">selected</c:if>>13</option>
    <option value="14时" <c:if test="${'31' eq curHours}">selected</c:if>>14</option>
    <option value="15时" <c:if test="${'31' eq curHours}">selected</c:if>>15</option>
    <option value="16时" <c:if test="${'31' eq curHours}">selected</c:if>>16</option>
    <option value="17时" <c:if test="${'31' eq curHours}">selected</c:if>>17</option>
    <option value="18时" <c:if test="${'31' eq curHours}">selected</c:if>>18</option>
    <option value="19时" <c:if test="${'31' eq curHours}">selected</c:if>>19</option>
    <option value="20时" <c:if test="${'31' eq curHours}">selected</c:if>>20</option>
    <option value="21时" <c:if test="${'31' eq curHours}">selected</c:if>>21</option>
    <option value="22时" <c:if test="${'31' eq curHours}">selected</c:if>>22</option>
    <option value="23时" <c:if test="${'31' eq curHours}">selected</c:if>>23</option>
    <option value="24时" <c:if test="${'31' eq curHours}">selected</c:if>>24</option>
    </select><span>时</span>
    <select name="minutes" value="${minutes}">
    <option value="1分" <c:if test="${'1' eq curMinutes}">selected</c:if>>1</option>
    <option value="2分" <c:if test="${'2' eq curMinutes}">selected</c:if>>2</option>
    <option value="3分" <c:if test="${'3' eq curMinutes}">selected</c:if>>3</option>
    <option value="4分" <c:if test="${'4' eq curMinutes}">selected</c:if>>4</option>
    <option value="5分" <c:if test="${'5' eq curMinutes}">selected</c:if>>5</option>
    <option value="6分" <c:if test="${'6' eq curMinutes}">selected</c:if>>6</option>
    <option value="7分" <c:if test="${'7' eq curMinutes}">selected</c:if>>7</option>
    <option value="8分" <c:if test="${'8' eq curMinutes}">selected</c:if>>8</option>
    <option value="9分" <c:if test="${'9' eq curMinutes}">selected</c:if>>9</option>
    <option value="10分" <c:if test="${'10' eq curMinutes}">selected</c:if>>10</option>
    <option value="11分" <c:if test="${'11' eq curMinutes}">selected</c:if>>11</option>
    <option value="12分" <c:if test="${'12' eq curMinutes}">selected</c:if>>12</option>
    <option value="13分" <c:if test="${'13' eq curMinutes}">selected</c:if>>13</option>
    <option value="14分" <c:if test="${'14' eq curMinutes}">selected</c:if>>14</option>
    <option value="15分" <c:if test="${'15' eq curMinutes}">selected</c:if>>15</option>
    <option value="16分" <c:if test="${'16' eq curMinutes}">selected</c:if>>16</option>
    <option value="17分" <c:if test="${'17' eq curMinutes}">selected</c:if>>17</option>
    <option value="18分" <c:if test="${'18' eq curMinutes}">selected</c:if>>18</option>
    <option value="19分" <c:if test="${'19' eq curMinutes}">selected</c:if>>19</option>
    <option value="20分" <c:if test="${'20' eq curMinutes}">selected</c:if>>20</option>
    <option value="21分" <c:if test="${'21' eq curMinutes}">selected</c:if>>21</option>
    <option value="22分" <c:if test="${'22' eq curMinutes}">selected</c:if>>22</option>
    <option value="23分" <c:if test="${'23' eq curMinutes}">selected</c:if>>23</option>
    <option value="24分" <c:if test="${'24' eq curMinutes}">selected</c:if>>24</option>
    <option value="25分" <c:if test="${'25' eq curMinutes}">selected</c:if>>25</option>
    <option value="26分" <c:if test="${'26' eq curMinutes}">selected</c:if>>26</option>
    <option value="27分" <c:if test="${'27' eq curMinutes}">selected</c:if>>27</option>
    <option value="28分" <c:if test="${'28' eq curMinutes}">selected</c:if>>28</option>
    <option value="29分" <c:if test="${'29' eq curMinutes}">selected</c:if>>29</option>
    <option value="30分" <c:if test="${'30' eq curMinutes}">selected</c:if>>30</option>
    <option value="31分" <c:if test="${'31' eq curMinutes}">selected</c:if>>31</option>
    <option value="32分" <c:if test="${'32' eq curMinutes}">selected</c:if>>32</option>
    <option value="33分" <c:if test="${'33' eq curMinutes}">selected</c:if>>33</option>
    <option value="34分" <c:if test="${'34' eq curMinutes}">selected</c:if>>34</option>
    <option value="35分" <c:if test="${'35' eq curMinutes}">selected</c:if>>35</option>
    <option value="36分" <c:if test="${'36' eq curMinutes}">selected</c:if>>36</option>
    <option value="37分" <c:if test="${'37' eq curMinutes}">selected</c:if>>37</option>
    <option value="38分" <c:if test="${'38' eq curMinutes}">selected</c:if>>38</option>
    <option value="39分" <c:if test="${'39' eq curMinutes}">selected</c:if>>39</option>
    <option value="40分" <c:if test="${'40' eq curMinutes}">selected</c:if>>40</option>
    <option value="41分" <c:if test="${'41' eq curMinutes}">selected</c:if>>41</option>
    <option value="42分" <c:if test="${'42' eq curMinutes}">selected</c:if>>42</option>
    <option value="43分" <c:if test="${'43' eq curMinutes}">selected</c:if>>43</option>
    <option value="44分" <c:if test="${'44' eq curMinutes}">selected</c:if>>44</option>
    <option value="45分" <c:if test="${'45' eq curMinutes}">selected</c:if>>45</option>
    <option value="46分" <c:if test="${'46' eq curMinutes}">selected</c:if>>46</option>
    <option value="47分" <c:if test="${'47' eq curMinutes}">selected</c:if>>47</option>
    <option value="48分" <c:if test="${'48' eq curMinutes}">selected</c:if>>48</option>
    <option value="49分" <c:if test="${'49' eq curMinutes}">selected</c:if>>49</option>
    <option value="50分" <c:if test="${'50' eq curMinutes}">selected</c:if>>50</option>
    <option value="51分" <c:if test="${'51' eq curMinutes}">selected</c:if>>51</option>
    <option value="52分" <c:if test="${'52' eq curMinutes}">selected</c:if>>52</option>
    <option value="53分" <c:if test="${'53' eq curMinutes}">selected</c:if>>53</option>
    <option value="54分" <c:if test="${'54' eq curMinutes}">selected</c:if>>54</option>
    <option value="55分" <c:if test="${'55' eq curMinutes}">selected</c:if>>55</option>
    <option value="56分" <c:if test="${'56' eq curMinutes}">selected</c:if>>56</option>
    <option value="57分" <c:if test="${'57' eq curMinutes}">selected</c:if>>57</option>
    <option value="58分" <c:if test="${'58' eq curMinutes}">selected</c:if>>58</option>
    <option value="59分" <c:if test="${'59' eq curMinutes}">selected</c:if>>59</option>
    <option value="60分" <c:if test="${'60' eq curMinutes}">selected</c:if>>60</option>
    </select><span>分</span>
    <select name="seconds" value="${seconds}">
    <option value="1秒" <c:if test="${'1' eq curMinutes}">selected</c:if>>1</option>
    <option value="2秒" <c:if test="${'2' eq curSeconds}">selected</c:if>>2</option>
    <option value="3秒" <c:if test="${'3' eq curSeconds}">selected</c:if>>3</option>
    <option value="4秒" <c:if test="${'4' eq curSeconds}">selected</c:if>>4</option>
    <option value="5秒" <c:if test="${'5' eq curSeconds}">selected</c:if>>5</option>
    <option value="6秒" <c:if test="${'6' eq curSeconds}">selected</c:if>>6</option>
    <option value="7秒" <c:if test="${'7' eq curSeconds}">selected</c:if>>7</option>
    <option value="8秒" <c:if test="${'8' eq curSeconds}">selected</c:if>>8</option>
    <option value="9秒" <c:if test="${'9' eq curSeconds}">selected</c:if>>9</option>
    <option value="10秒" <c:if test="${'10' eq curSeconds}">selected</c:if>>10</option>
    <option value="11秒" <c:if test="${'11' eq curSeconds}">selected</c:if>>11</option>
    <option value="12秒" <c:if test="${'12' eq curSeconds}">selected</c:if>>12</option>
    <option value="13秒" <c:if test="${'13' eq curSeconds}">selected</c:if>>13</option>
    <option value="14秒" <c:if test="${'14' eq curSeconds}">selected</c:if>>14</option>
    <option value="15秒" <c:if test="${'15' eq curSeconds}">selected</c:if>>15</option>
    <option value="16秒" <c:if test="${'16' eq curSeconds}">selected</c:if>>16</option>
    <option value="17秒" <c:if test="${'17' eq curSeconds}">selected</c:if>>17</option>
    <option value="18秒" <c:if test="${'18' eq curSeconds}">selected</c:if>>18</option>
    <option value="19秒" <c:if test="${'19' eq curSeconds}">selected</c:if>>19</option>
    <option value="20秒" <c:if test="${'20' eq curSeconds}">selected</c:if>>20</option>
    <option value="21秒" <c:if test="${'21' eq curSeconds}">selected</c:if>>21</option>
    <option value="22秒" <c:if test="${'22' eq curSeconds}">selected</c:if>>22</option>
    <option value="23秒" <c:if test="${'23' eq curSeconds}">selected</c:if>>23</option>
    <option value="24秒" <c:if test="${'24' eq curSeconds}">selected</c:if>>24</option>
    <option value="25秒" <c:if test="${'25' eq curSeconds}">selected</c:if>>25</option>
    <option value="26秒" <c:if test="${'26' eq curSeconds}">selected</c:if>>26</option>
    <option value="27秒" <c:if test="${'27' eq curSeconds}">selected</c:if>>27</option>
    <option value="28秒" <c:if test="${'28' eq curSeconds}">selected</c:if>>28</option>
    <option value="29秒" <c:if test="${'29' eq curSeconds}">selected</c:if>>29</option>
    <option value="30秒" <c:if test="${'30' eq curSeconds}">selected</c:if>>30</option>
    <option value="31秒" <c:if test="${'31' eq curSeconds}">selected</c:if>>31</option>
    <option value="32秒" <c:if test="${'32' eq curSeconds}">selected</c:if>>32</option>
    <option value="33秒" <c:if test="${'33' eq curSeconds}">selected</c:if>>33</option>
    <option value="34秒" <c:if test="${'34' eq curSeconds}">selected</c:if>>34</option>
    <option value="35秒" <c:if test="${'35' eq curSeconds}">selected</c:if>>35</option>
    <option value="36秒" <c:if test="${'36' eq curSeconds}">selected</c:if>>36</option>
    <option value="37秒" <c:if test="${'37' eq curSeconds}">selected</c:if>>37</option>
    <option value="38秒" <c:if test="${'38' eq curSeconds}">selected</c:if>>38</option>
    <option value="39秒" <c:if test="${'39' eq curSeconds}">selected</c:if>>39</option>
    <option value="40秒" <c:if test="${'40' eq curSeconds}">selected</c:if>>40</option>
    <option value="41秒" <c:if test="${'41' eq curSeconds}">selected</c:if>>41</option>
    <option value="42秒" <c:if test="${'42' eq curSeconds}">selected</c:if>>42</option>
    <option value="43秒" <c:if test="${'43' eq curSeconds}">selected</c:if>>43</option>
    <option value="44秒" <c:if test="${'44' eq curSeconds}">selected</c:if>>44</option>
    <option value="45秒" <c:if test="${'45' eq curSeconds}">selected</c:if>>45</option>
    <option value="46秒" <c:if test="${'46' eq curSeconds}">selected</c:if>>46</option>
    <option value="47秒" <c:if test="${'47' eq curSeconds}">selected</c:if>>47</option>
    <option value="48秒" <c:if test="${'48' eq curSeconds}">selected</c:if>>48</option>
    <option value="49秒" <c:if test="${'49' eq curSeconds}">selected</c:if>>49</option>
    <option value="50秒" <c:if test="${'50' eq curSeconds}">selected</c:if>>50</option>
    <option value="51秒" <c:if test="${'51' eq curSeconds}">selected</c:if>>51</option>
    <option value="52秒" <c:if test="${'52' eq curSeconds}">selected</c:if>>52</option>
    <option value="53秒" <c:if test="${'53' eq curSeconds}">selected</c:if>>53</option>
    <option value="54秒" <c:if test="${'54' eq curSeconds}">selected</c:if>>54</option>
    <option value="55秒" <c:if test="${'55' eq curSeconds}">selected</c:if>>55</option>
    <option value="56秒" <c:if test="${'56' eq curSeconds}">selected</c:if>>56</option>
    <option value="57秒" <c:if test="${'57' eq curSeconds}">selected</c:if>>57</option>
    <option value="58秒" <c:if test="${'58' eq curSeconds}">selected</c:if>>58</option>
    <option value="59秒" <c:if test="${'59' eq curSeconds}">selected</c:if>>59</option>
    <option value="60秒" <c:if test="${'60' eq curSeconds}">selected</c:if>>60</option>
    </select><span>秒</span></div><br>
    <div class="input-group">
	<input type="text" name="foodPrice" value="<%=foodPrice%>">
	</div>
	<div class="input-group">
    <span class="col-sm-2 col-form-label">是否选择购买:</span>
    </div>
    <select name="status"  value="${status}">     
 	 <option value="0">-请选择-</option>     
 	 <option value="已购买" <c:if test="${'1' eq curStatus}">selected</c:if> >是</option>     
  	 <option value="未购买" <c:if test="${'2' eq curStatus}">selected</c:if> >否</option>  
 	</select>  
	<div class="input-group">
    <button type="submit" class="btn btn-primary">Submit</button>
    </div>
	</form>
</body>
</html>